package com.finance.cooperate.dao.repository.primary;

import com.finance.cooperate.dao.entity.primary.User;
import com.finance.cooperate.dao.support.jpa.BaseRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

/**
 * @InterfaceName UserRepository
 * @Description 用户信息仓库
 * @Author shen
 * @Date 2023/8/6 21:25
 * @Modify ...
 */
@Repository
public interface UserRepository extends BaseRepository<User, String> {

    @Query(value = "SELECT COUNT(1) FROM app_user WHERE device_id = ?1 AND create_time > '2023-08-01'", nativeQuery = true)
    Integer getSameDeviceUserCount(String deviceId);

}
